<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        {{damu.wife.son.sonName}}
    </div>
</body>
<script src="./MVVM/mvvm.js"></script>
<script src="./MVVM/observer.js"></script>
<script src="./MVVM/compile.js"></script>
<script src="./MVVM/watcher.js"></script>
<script>
    // 数据劫持的顺序
    // msg damuName damuAge wifeName wifeAge sonName sonAge son wife damu

    // dep分配的顺序 (属性被访问  ; Dep.target被设置真值)
    // msg(dep0) damu(dep0) damuName damuAge wife wifeName wifeAge son  sonName sonAge
    var vm = new MVVM({
        el:"#app",
        data:{
            //数据描述符
            msg:"hello world",
            damu:{
                damuName:"达姆",
                damuAge:18,
                wife:{
                    wifeName:"冬雨",
                    wifeAge:18,
                    son:{
                        sonName:"小乐",
                        sonAge:8
                    }
                }
            }
        }
    })

    console.log(vm.msg)
</script>
</html>